/* ========== 基础样式设置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    overflow: hidden; /* 防止页面整体滚动 */
}

/* ========== 主容器布局 ========== */
.main-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
}

/* 主要内容区域 - 三栏布局 */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 250px 1fr 300px; /* 左侧300px，中间自适应，右侧300px */
    gap: 15px;
    height: calc(100vh - 20px); /* 减去容器的padding */
    overflow: hidden;
}

/* ========== 左侧车辆状态显示区 ========== */
.status-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 状态面板头部 */
.status-panel .panel-header {
    padding: 5px 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.status-panel .panel-header h2 {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* 状态网格容器 - 带滚动条 */
.status-grid {
    flex: 1;
    overflow-y: auto; /* 垂直滚动条 */
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 自定义滚动条样式 */
.status-grid::-webkit-scrollbar {
    width: 6px;
}

.status-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.status-grid::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.6);
    border-radius: 3px;
}

.status-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.8);
}

/* 状态卡片样式 */
.status-card {
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.status-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 车辆状态监控-状态卡片头部 */
.status-card .card-header {
    padding: 1px 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px 8px 0 0;
}

/* 车辆状态监控-状态卡片头部 */
.status-card .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

/* 车辆状态监控-状态列表 */
.status-list {
    padding: 3px 15px;
}

/* 状态项 */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.status-item:last-child {
    border-bottom: none;
}

/* 车辆状态监控-状态标签 */
.status-label {
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    min-width: 60px;
}

/* 车辆状态监控-状态值样式 */
.status-value {
    font-size: 16px;
    font-weight: 600;
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 车辆状态监控-禁用状态的样式 */
.status-disabled {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
}

/* 车辆状态监控-启用状态的样式 */
.status-enabled {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
}

/* ========== 中间控制面板区 ========== */
.control-panel-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

/* 全局控制区（第一行） */
.global-controls {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* 系统控制和综合数据曲线图的比例 */
    gap: 15px;
    height: 50%; /* 占用控制面板一半高度 */
}


/* 车辆控制面板（中间第二行） - 横向滚动布局 */
.vehicle-controls {
    display: flex;
    flex-direction: row; /* 横向排列 */
    flex-wrap: nowrap; /* 禁止换行 */
    gap: 10px; /* 元素间距 */
    height: 50%;
    padding: 4px;
    
    /* 横向滚动设置 */
    overflow-x: auto; /* 横向超出时显示滚动条 */
    overflow-y: hidden; /* 隐藏纵向滚动 */
    
    /* 滚动条样式优化（可选） */
    scrollbar-width: thin; /* Firefox细滚动条 */
}

/* 控制面板内的子元素样式 */
.vehicle-controls > * {
    flex-shrink: 0; /* 防止子元素被压缩 */
    min-width: 150px; /* 设置最小宽度，根据实际需求调整 */
}

/* 自定义滚动条样式（Webkit浏览器） */
.vehicle-controls::-webkit-scrollbar {
    height: 8px; /* 横向滚动条高度 */
}

.vehicle-controls::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1); /* 滚动条轨道背景 */
    border-radius: 4px;
}

.vehicle-controls::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3); /* 滚动条颜色 */
    border-radius: 4px;
}

.vehicle-controls::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5); /* 鼠标悬停时颜色 */
}


/* 控制卡片布局优化 */
.vehicle-controls .control-card {
    flex: 0 0 180px;/* 固定宽度，不允许伸缩 */
    padding: 6px; /* 进一步减小内边距 */
    font-size: 0.85em; /* 更小的字体 */
}

/* 控制卡片头部 */
.vehicle-controls .card-header {
    margin-bottom: 6px;
    padding-bottom: 4px;
}

.vehicle-controls .card-header h3 {
    font-size: 14px; /* 更小的标题 */
    text-align: center; /* 标题居中 */
    margin: 0; /* 去掉默认外边距 */
    line-height: 1.2; /* 行高调整，确保文字垂直居中 */
}

/* 挡位和灯光按钮组样式 */
.vehicle-controls .gear-buttons,
.vehicle-controls .front-light-buttons,
.vehicle-controls .light-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin: 4px auto; /* 上下margin为4px，左右自动居中 */
    width: 100%;      /* 占满容器宽度 */
    max-width: 160px; /* 限制最大宽度 */
    padding: 0 2px;   /* 左右添加小边距 */
}

/* 挡位和灯光按钮样式 */
.vehicle-controls .gear-btn,
.vehicle-controls .front-light-btn,
.vehicle-controls .light-btn {
    flex: 0 0 calc(50% - 2px); /* 两列布局，考虑间距 */
    height: 22px;              /* 固定高度 */
    min-width: 0;              /* 允许收缩 */
    padding: 0;                /* 移除内边距 */
    margin: 1px;               /* 统一外边距 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 激活状态的按钮样式优化 */
.vehicle-controls .gear-btn.active,
.vehicle-controls .front-light-btn.active,
.vehicle-controls .light-btn.active {
    font-weight: bold;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
}

/* 数值显示调整 */
.vehicle-controls .value-display-large {
    font-size: 16px;
    padding: 4px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px; /* 确保足够的高度 */
}

/* 中间控制区域-ip输入 */
.control-enabled {
    /* display: flex;
    gap: 10px; */
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 中间控制区-输入组 */
.input-group label {
    font-size: 18px;
    font-weight: 500;
    color: #6c757d;
}

.input-group input {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 开关组样式 */
.switch-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch-label {
    font-size: 18px;
    font-weight: 500;
    color: #495057;
    min-width: 60px;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 连接状态文本 */
.connect-status-text {
    font-size: 18px;
    font-weight: 600;
    min-width: 60px;
}

.connect-status-text.connected {
    color: #28a745;
}

.connect-status-text.disconnected {
    color: #dc3545;
}

/* 连接状态显示 */
.connection-status {
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
}

.connection-status.connected {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.connection-status.disconnected {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* 按钮行样式 */
.button-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* 通用按钮样式 */
button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.btn-min {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
}

.btn-min:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}


.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a02622);
    transform: translateY(-1px);
}

/* 帮助文本 */
.help-text {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 综合数据曲线图卡片 */
.chart-card-large {
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.chart-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.chart-controls {
    display: flex;
    gap: 5px;
}

.chart-btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.chart-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.chart-container-large {
    flex: 1;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* 车辆控制区特殊样式 */
.value-display-large {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #007bff;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid rgba(0, 123, 255, 0.1);
}
.value-display-small {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #007bff;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
    border-radius: 6px;
    padding: 1px;
    margin-bottom: 2px;
    border: 2px solid rgba(0, 123, 255, 0.1);
}



/* 控制滑块样式 */
.control-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    margin: 10px 0;
    -webkit-appearance: none;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.control-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 启用按钮样式 */
.enable-button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.enable-button.enabled {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.enable-button.disabled {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

/* 控制禁用状态 */
.control-disabled {
    opacity: 0.4;
    /* display: flex;
    gap: 10px; */
    pointer-events: none;
}

/* 挡位按钮样式 */
.gear-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.gear-btn {
    padding: 8px;
    font-size: 14px;
    font-weight: 600;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.gear-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
}

/* 驾驶模式按钮 */
.mode-toggle-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #fd7e14, #e55a00);
    color: white;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* 泊车状态选择器 */
.parking-status-selector {
    margin-bottom: 15px;
}

.parking-status-selector h4 {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    text-align: center;
}

.parking-status-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.parking-button {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.parking-button.active {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border-color: #ffc107;
}

.parking-button.complete {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
}

/* 数字输入组样式 - 防止边界溢出*/
/* 修复数字输入组样式 - 防止边界溢出 */
.number-input-group {
    display: flex;
    align-items: center;
    gap: 6px;  /* 减少间距 */
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 6px 8px;  /* 减少内边距 */
    background-color: #f8f9fa;
    border-radius: 4px;  /* 减小圆角 */
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    /* 确保不超出父容器 */
    width: 100%;
    max-width: 100%;  /* 添加最大宽度限制 */
    max-height: 35px;
    box-sizing: border-box;
    overflow: hidden;  /* 防止内容溢出 */
}

.number-input-label {
    font-size: 10px;  /* 进一步减小字体 */
    color: #495057;
    font-weight: 500;
    min-width: 45px;  /* 减少最小宽度 */
    max-width: 50px;  /* 添加最大宽度限制 */
    white-space: nowrap;
    flex-shrink: 0;  /* 防止标签被压缩 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.number-input {
    flex: 1;
    min-width: 0;  /* 允许flex项目收缩 */
    max-width: 60px;  /* 限制最大宽度 */
    padding: 4px 6px;  /* 减少内边距 */
    font-size: 12px;  /* 减小字体 */
    font-weight: bold;
    border: 1px solid #ced4da;  /* 减少边框宽度 */
    border-radius: 3px;  /* 减小圆角 */
    background-color: #fff;
    color: #333;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.number-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);  /* 减小焦点阴影 */
    background-color: #f8f9ff;
}

.number-input:hover {
    border-color: #6c757d;
}

/* 确保控制卡片有足够的容器约束 */
.control-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;  /* 减少内边距 */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;  /* 确保内容不溢出 */
    min-width: 0;  /* 允许flex项目收缩 */
    position: relative;  /* 确保定位正确 */
}

/* 禁用状态下的样式调整 */
.control-disabled .number-input-group {
    background-color: #fff;
    /* border-color: #28a745; */
    box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.1);
}

.control-disabled .number-input-label {
    /* color: #28a745; */
    font-weight: 600;
}

.control-disabled .number-input {
    background-color: #fff;
    /* border-color: #28a745; */
    color: #333;
}

.control-disabled .number-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);
}

/* 移除数字输入框的上下箭头 */
.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input[type=number] {
    -moz-appearance: textfield;
}

/* 响应式设计 - 进一步优化小屏幕 */
@media (max-width: 1200px) {
    .number-input-group {
        gap: 4px;
        padding: 4px 6px;
    }
    
    .number-input-label {
        font-size: 9px;
        min-width: 35px;
        max-width: 40px;
    }
    
    .number-input {
        font-size: 11px;
        padding: 3px 4px;
        max-width: 45px;
    }
}

@media (max-width: 768px) {

    
    .number-input-group {
        gap: 3px;
        padding: 3px 4px;
    }
    
    .number-input-label {
        font-size: 8px;
        min-width: 30px;
        max-width: 35px;
    }
    
    .number-input {
        font-size: 10px;
        padding: 2px 3px;
        max-width: 35px;
    }
}

/* 确保其他控制元素不会挤压数字输入框 */
.control-card .value-display-large {
    margin-bottom: 5px;
}

.control-card .enable-button {
    margin-top: 5px;
}

.control-card .help-text {
    margin-top: 5px;
    font-size: 10px;  /* 减小帮助文字 */
    line-height: 1.2;
}

/* 脉冲动画效果 */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* ========== 右侧数据可视化区 ========== */
.chart-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 图表面板头部 */
.chart-panel .panel-header {
    padding: 5px 20px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px rgba(23, 162, 184, 0.3);
}

.chart-panel .panel-header h2 {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* 图表网格容器 - 带滚动条 */
.chart-grid {
    flex: 1;
    overflow-y: auto; /* 垂直滚动条 */
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 图表网格滚动条样式 */
.chart-grid::-webkit-scrollbar {
    width: 6px;
}

.chart-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.chart-grid::-webkit-scrollbar-thumb {
    background: rgba(23, 162, 184, 0.6);
    border-radius: 3px;
}

.chart-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(23, 162, 184, 0.8);
}

/* 图表卡片样式 */
.chart-card {
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 5px;
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 图表头部 */
.chart-card .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.chart-card .chart-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

/* 图表容器 */
.chart-container {
    height: 150px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* 图表画布 */
.chart-canvas {
    width: 100%;
    height: 100%;
}

/* 预留图表区域样式 */
.chart-placeholder {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1), rgba(108, 117, 125, 0.05));
    border: 2px dashed rgba(108, 117, 125, 0.3);
}

.chart-placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-style: italic;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 280px 1fr 280px;
    }
    
 
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 250px;
    }
    

    
    .value-display-large {
        font-size: 24px;
        padding: 12px;
    }
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .status-panel,
    .chart-panel {
        height: 300px;
    }
    
    .control-panel-main {
        height: auto;
    }
    
    .global-controls {
        grid-template-columns: 1fr;
        height: auto;
    }
    

}









/* 枚举选择器容器 - 每行两个按钮布局 */
.enum-select {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 两列等宽布局 */
    gap: 6px; /* 按钮间距 */
    margin: 8px 0;
    padding: 4px;
}

/* 枚举按钮基础样式 */
.enum-button {
    /* 尺寸和布局 */
    height: 22px;
    min-width: 0; /* 允许按钮收缩 */
    padding: 4px 8px;
    
    /* 外观样式 */
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    
    /* 文字样式 */
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* 交互效果 */
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* 确保内容居中 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 枚举按钮悬停效果 */
.enum-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 枚举按钮激活状态 */
.enum-button.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-color: #007bff;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,123,255,0.3);
}

/* 激活按钮的悬停效果 */
.enum-button.active:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    border-color: #004085;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,123,255,0.4);
}

/* 多输入组容器 */
.multi-input-group {
    margin-bottom: 6px;
    padding: 3px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

/* 标签组容器 - 第一行：label和dataType */
.multi-input-label-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}

/* 字段标签 */
.multi-input-label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    flex: 1; /* 占据剩余空间 */
}

/* 数据类型标签 */
.multi-input-datatype {
    font-size: 10px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 2px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    flex-shrink: 0; /* 不允许收缩 */
}

/* 输入框 - 独占一行 */
.multi-input {
    width: 100%;
    height: 26px;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* 输入框交互状态 */
.multi-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

.multi-input:hover {
    border-color: #adb5bd;
}